I wrote an algorithm called a State Saving Interpreter, which saves the state of the List Prolog Interpreter (including variables and recursive states of predicates and commands) at https://github.com/luciangreen/SSI. I will use it to develop web apps and even an online Prolog interpreter. Prolog applications can be ported to the web, which needs the interpreter state to be saved to run applications.